package com.tan.androidtest.materialdesign;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;

import com.tan.androidtest.R;

/**
 * 测试CoordinatorLayout 配合materialDesign 等控件试下 知乎详情效果
 */

public class TestCoordinatorLayoutActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test_coordinatorlayout_layout);
        Toolbar tool_bar = findViewById(R.id.tool_bar);
        tool_bar.setNavigationIcon(R.mipmap.icon_left_back);
        setSupportActionBar(tool_bar);
        CollapsingToolbarLayout collapsingToolbarLayout = findViewById(R.id.collapsing_toolbar);
        collapsingToolbarLayout.setExpandedTitleColor(ContextCompat.getColor(this, R.color.red_ff2e31));
        collapsingToolbarLayout.setCollapsedTitleTextColor(ContextCompat.getColor(this, R.color.black_1d1d20));
    }


}
